<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/9/25
  Time: 10:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="js/jquery-1.6.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function(){
        $("#phone").blur(function(){
            //1.得到输入的手机号
            var phone=$(this).val();
            //2.将手机号传递给后台
            $.ajax({
                url:"getphonecity",
                data:"phone="+phone,
                type:"post",
                dataType:"json",
                success:function(rs){
                      //  alert(rs);
                    $("#phone").next().html(rs.str);
                }
            });

        });
    })
</script>

<html>
<head>
    <title>Title</title>
    <h1>success.jsp</h1>
    <h1>当前用户:${sessionScope.user1.userName}</h1>
    归属地查询:<input type="text" id="phone"><span></span>
    <a href="/loginout">退出</a>
</head>
<body>

</body>
</html>
